#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include<cstring>
using namespace std;
class Student
{
	char* member;
		int score[10];
		int static total;
		int static number;
public:
	Student()
	{
		member = new char(100);
		*member = 0;
		score[10] = { 0 };
	}
	int add()
	{
		int ct = 0;
		int i = 0;
		for (i; i < number; i++)
		{
			ct = ct + score[i];
		}
		cout << ct << endl;
		return ct;
	}
	static void Average(int sum);
	void set(char* t, int i);
};
int Student::number = 0;
void Student::set(char* t, int f)
{
number++;
	
	strcat(member, t);

	score[number-1] = f;
}
void Student::Average(int sum)
{
	cout << sum / number;
}
int main()
{
	Student s;
	char* g;
	int m;
	int i = 5;
	while (i--)
	{
		char name[10] = { 0 };
		int score;
		cin>>name;
	cin >> score;
	g = name;
	m = score;
	s.set(g, m);
	}
	int sum = s.add();
	s.Average(sum);
	return 0;
}